triangleQ[x1_,y1_,x2_,y2_,x3_,y3_]:=Module[{d,m},
m={{x1,y1,1},{x2,y2,1},{x3,y3,1}};
d=Det[m];
If[d !=0,Print["True"],Print["False"]];
(*Show[Graphics[{PointSize[0.02],Point[{{x1,y1},{x2,y2},{x3,y3}}],Line[{{x1,y1},{x2,y2},{x3,y3},{x1,y1}}]},Axes->True]]*)
]

triangleQ[1,2,5,3,4,5]

triangleDiamesoi[x1_,y1_,x2_,y2_,x3_,y3_]:=Module[{x,y,mx1,my1,mx2,my2,mx3,my3},
x=(x1+x2+x3)/3;
y=(y1+y2+y3)/3;
Print["Το βαρύκεντρο είναι το σημείο (",x,",",y,")"];

mx1=(x2+x3)/2;
my1=(y2+y3)/2;
mx2=(x1+x3)/2;
my2=(y1+y3)/2;
mx3=(x1+x2)/2;
my3=(y1+y2)/2;
Print["Τα μέσα των πλευρών είναι (",mx1,",",my1,")","(",mx2,",",my2,")","(",mx3,",",my3,")" ];

Graphics[{PointSize[0.02],Point[{{x1,y1},{x2,y2},{x3,y3},{x,y},{mx1,my1},{mx2,my2},{mx3,my3}}],Line[{{x1,y1},{x2,y2},{x3,y3},{x1,y1}}],
Line[{{x1,y1},{mx1,my1}}],
Line[{{x2,y2},{mx2,my2}}],
Line[{{x3,y3},{mx3,my3}}]},
Axes->True]
]

triangleDiamesoi[1,2,3,5,4,3]